using System;
using System.Collections.Generic;
using System.Text;
using Refly.CodeDom;
using Refly.CodeDom.Statements;
using Refly.CodeDom.Expressions;

namespace Doubler.Templates.Recorder.RecorderActions
{
    public class RecordCalled : RecorderActionBase
    {
        #region RecorderActionBase Members

        protected override void doAct(Refly.CodeDom.IClassDeclaration recorder, Refly.CodeDom.MethodDeclaration recorderMethod, Refly.CodeDom.Expressions.NativePropertyReferenceExpression recordingProperty, Reflector.CodeModel.ITypeReference subject, Reflector.CodeModel.IMethodDeclaration methodInformation)
        {
            Expression RecordCalled = recordingProperty.Prop(RecorderGenerator.RecordingCalled);
            Statement AssignRecordCalled = Stm.Assign(RecordCalled, Expr.True);
            recorderMethod.Body.Add(AssignRecordCalled);
        }

        #endregion
    }
}
